package com.hjq.mallproduct.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @auther HJQ
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.hjq.mallproduct.dao")
public class MyBatisConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor pagination = new PaginationInterceptor();
        pagination.setOverflow(true);
        pagination.setLimit(10000L);
        return pagination;

    }
}
